#!/bin/sh -e

# shellcheck disable=3045,2039
ulimit -n 4096 ||:

./configure \
    --prefix=/usr \
    --with-intl=small-icu \
    --fully-static \
    --ninja

# Remove broken subninja that we don't require anyway.
# clsed '/^subninja.*openssl-fipsmodule/d' out/Release/build.ninja

ninja -C out/Release
tools/install.py install "$1" /usr
